import { request, withCancelToken } from '../utils/request'

const cartList = (data) =>{
  return request('/member/cart',{
    method: 'get'
  })
}

const selected = (data) => {
  return request('/member/cart/selected',{
    method: 'put',
    data
  })
}

const deleCartList = (data) => {
  return request('/member/cart',{
    method: 'delete',
    data
  })
}

const [ cartListSend ] = withCancelToken(cartList)
const [ selectedSend ] = withCancelToken(selected)
const [ deleCartListSend ] = withCancelToken(deleCartList)
export {
  cartListSend,
  selectedSend,
  deleCartListSend
}